<?php

class WeatherInHeader extends CWidget
{
	public function run()
	{
		$Weather = new Weather();
		$dataObj = $Weather->findWeatherInCities();
		
		$result = array();
		
		foreach ($dataObj as $item) {
			$result[$item->cityAlias] = $item->attributes;
		}
		
		$this->render('weather', array(
			'cities' => $result
		));
	}
}